<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
    	var n=prompt("请输入一个数");
    	var i=n.length;
    	for (var x = i; x >=0; x--)
    	{
      	 	document.write(n.charAt(x));
    	}
        </script>
	</body>
</html>
